<?php
class WooCommandAddVenue extends WooCommandCommand{

	
	function doExecute(WooControllerRequest $request){
		$name = $request->getProperty("venue_name");
		if(! name){
			$request->addFeedback("no name provided");
			return self::statuses('CMD_INSUFFICIENT_DATA');
		}else{
			$venue_obj = new WooDomainVenue(null,$name);
			$request->setObject('venue',$venue_obj);
			$request->addFeedback("'$name' added ({$venue_obj->getID()})");
			return self::statuses('CMD_OK');
		}
	}


}